package light.head.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *	企业荣誉证书
 */
@Entity
@Table
public class Certificates implements Serializable{
	private static final long serialVersionUID = -2186686615392741862L;
	private Integer code;					// 流水号
	private Integer oc;						// 公司编号
	private String name;					// 证照名称
	private String grantOrgan;				// 发证机构
	private Date grantTime;					// 生效时间
	private String validity;				// 有效期
	private Integer cu;						// 创建人
	private Date ct;						// 创建时间
	private Boolean deleted = false;		// 是否删除
	private List<CertificatesAnnex> list;	// 图片附件
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column
	public Integer getOc() {
		return oc;
	}
	@Column
	public String getName() {
		return name;
	}
	@Column
	public String getGrantOrgan() {
		return grantOrgan;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column
	public Date getGrantTime() {
		return grantTime;
	}
	@Column
	public String getValidity() {
		return validity;
	}
	@Column
	public Integer getCu() {
		return cu;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable = false, nullable = false)
	public Date getCt() {
		return ct;
	}
	@Column
	public Boolean getDeleted() {
		return deleted;
	}
	@Transient
	public List<CertificatesAnnex> getList() {
		return list;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public void setOc(Integer oc) {
		this.oc = oc;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setGrantOrgan(String grantOrgan) {
		this.grantOrgan = grantOrgan;
	}
	public void setGrantTime(Date grantTime) {
		this.grantTime = grantTime;
	}
	public void setValidity(String validity) {
		this.validity = validity;
	}
	public void setCu(Integer cu) {
		this.cu = cu;
	}
	public void setCt(Date ct) {
		this.ct = ct;
	}
	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
	public void setList(List<CertificatesAnnex> list) {
		this.list = list;
	}
	
}
